-module(test0).
-export([f1/1, f2/1]).

f(N, Class) ->
    F = object:new(Class),
    Res = object:call(F, fact, [N]),
    object:delete(F),
    Res.


f1(N) ->
    f(N, class1).
f2(N) ->
    f(N, class2).